package com.itheima.xinxi.system.factory;

import com.itheima.xinxi.system.controller.BaseStudentController;
import com.itheima.xinxi.system.controller.OtherStudentController;
import com.itheima.xinxi.system.controller.StudentController;
import com.itheima.xinxi.system.dao.BaseStudentDao;
import com.itheima.xinxi.system.dao.OtherStudentDao;
import com.itheima.xinxi.system.dao.StudentDao;

/**
 *
 * factory 没有耦合
 * 框架的时候优化他  spring 雏形
 */
public class Factory {

    public static BaseStudentDao getStudentDao(){

        //return new OtherStudentDao();
        return new StudentDao();
    }
    public static BaseStudentController getStudentController(){

       // return new StudentController();
        return new OtherStudentController();
    }
}
